#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void reverse(int* left, int* right)
{
    while (left < right)
    {
        int tmp = *left;
        *left = *right;
        *right = tmp;
        left++;
        right--;
    }
}

void rotate(int* nums, int numsSize, int k) {

    int n = numsSize;
    k %= n;
    reverse(nums, nums + n - k - 1);
    reverse(nums + n - k, nums + n - 1);
    reverse(nums, nums + n - 1);

    return nums;
}

int missingNumber(int* nums, int numsSize) {

    int n = numsSize;
    int ret = 0;

    for (int i = 0; i <= n; i++)
    {
        ret ^= i;
    }
    for (int j = 0; j < n; j++)
    {
        ret ^= nums[j];

    }
    return ret;
}

int main()
{

	return 0;
}

